/* eslint-disable no-unused-vars */
/**
 * Created by jianyijun on 2020/03/20.
 * 路由管理
 */
import React, { Component } from 'react';
import { createAppContainer, TabBarBottom } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import { createBottomTabNavigator } from 'react-navigation-tabs';
import { Images, AppCommonColor } from './public/images/images';
import { Scene, Router, Stack, Tabs, Lightbox } from 'react-native-router-flux';
import { Icon, Root } from 'native-base';
import { View, Image } from 'react-native';
import TabBarItem from './components/TabBarItem';
import StartPage from './StartPage';

// 消息
import message from './pages/message/message';
import messagePage from './pages/message/messagePage/messagePage';
import filePage from './pages/message/messagePage/filePage/filePage';
import settings from './pages/message/settings/settings';
import findRecords from './pages/message/findRecords/findRecords';
import addfriends from './pages/message/addfriends/addfriends';
import notice from './pages/message/messagePage/notice/notice';
import selectcontact from './pages/message/settings/selectcontact/selectcontact';
import scanAndAddFriends from './pages/message/scanAndAddFriends/scanAndAddFriends';
import voice from './pages/message/messagePage/voice/voice';
import video from './pages/message/messagePage/video/video';
import location from './pages/message/messagePage/location/location';
import Groupchatnickname from './pages/message/settings/Groupchatnickname'
import info from './pages/SearchResult/info'
import SearchResult from './pages/SearchResult/SearchResult'
// 通讯录
import maillist from './pages/maillist/maillist';
import newfriends from './pages/maillist/newfriends/newfriends';
import introduces from './pages/maillist/introduces/introduces';
import friendAvatar from './pages/maillist/introduces/friendAvatar';
import corporatefriends from './pages/maillist/corporatefriends/corporatefriends'
import remarks from './pages/maillist/remarks/remarks';
import complaint from './pages/maillist/complaint/complaint';
// 搜索
import search from './pages/search/search';
import searchInput from './pages/search/searchInput';
import screens from './pages/search/screens';
// 社圈
import socialcircle from './pages/socialcircle/socialcircle';
import socialcircleDetails from './pages/socialcircle/details';
import socialCirclePromotion from './pages/socialcircle/socialCirclePromotion/socialCirclePromotion';
import promotionProgress from './pages/socialcircle/socialCirclePromotion/promotionProgress/promotionProgress';
import recentAlbum from './pages/socialcircle/recentAlbum';
import publish from './pages/socialcircle/publish';
import addPosition from './pages/socialcircle/addPosition';
import allowedPerson from './pages/socialcircle/allowedPerson';
import notAllowedPerson from './pages/socialcircle/notAllowedPerson';
import likeComment from './pages/socialcircle/likeComment';
import uploadDetails from './pages/socialcircle/uploadDetails';
import uploadAddDescribe from './pages/socialcircle/uploadAddDescribe';
// 我的
import my from './pages/my/my';
import personAccount from './pages/my/personAccount/personAccount';
import enterAccount from './pages/my/enterAccount/enterAccount';
import authentications from './pages/my/enterAccount/authentication/authentication';
import openMember from './pages/my/openMemberRights/openMemder';
import myAlbum from './pages/my/myAlbum/myAlbum';
import upload from './pages/my/myAlbum/uploadAndDetails/upload';
import details from './pages/my/myAlbum/uploadAndDetails/details';
import personalData from './pages/my/personalData/personalData';
import businLicense from './pages/my/personalData/businLicense/businLicense';
import personalPortrait from './pages/my/personalData/editPersonalPortrait/editPersonalPortrait';
import editNickname from './pages/my/personalData/editNickname/editNickname';
import editorialMotto from './pages/my/personalData/editorialMotto/editorialMotto';
import editingHobbies from '././pages/my/personalData/editingHobbies/editingHobbies';
import editingProfession from './pages/my/personalData/editingProfession/editingProfession';
import editSkillTag from './pages/my/personalData/editSkillTag/editSkillTag';
import editingShowPhone from './pages/my/personalData/editingShowPhone/editingShowPhone';
import myCardBag from './pages/my/myCardBag/myCardBag';
import certificateDetails from './pages/my/myCardBag/listofCertiDocum/certificateDetails/certificateDetails';
import addCertificate from './pages/my/myCardBag/listofCertiDocum/addCertificate/addCertificate';
import addCertificates from './pages/my/myCardBag/listofCertiDocum/addCertificates/addCertificates';
import bankCardManag from './pages/my/myCardBag/bankCardFileList/bankCardManag/bankCardManag';
import addBankCards from './pages/my/myCardBag/bankCardFileList/addBankCards/addBankCards';
import verifyNumberBank from './pages/my/myCardBag/bankCardFileList/addBankCards/verifyPhoneBank/verifyNumberBank';
import addComplete from './pages/my/myCardBag/bankCardFileList/addBankCards/verifyPhoneBank/addComplete';
import mySocialCircle from './pages/my/mySocialCircle/mySocialCircle';
import functionMenuList from './pages/message/functionMenuList/functionMenuList';
import resume from './pages/my/resume/resume';
import editresume from './pages/my/resume/editresume/editresume';
import editworkpermit from './pages/my/resume/editworkpermit/editworkpermit';
import qrcode from './pages/my/qrcode/qrcode';
import seenme from './pages/my/seenme/seenme';
import setup from './pages/my/setup/setup';
import aboutJX from './pages/my/setup/aboutJX/aboutJX';
import userAgreement from './pages/my/setup/aboutJX/userAgreement/userAgreement';
import security from './pages/my/setup/security/security';
import privacy from './pages/my/setup/privacy/privacy';
import visibletime from './pages/my/setup/privacy/visibletime/visibletime';
import authentication from './pages/my/setup/security/authentication/authentication';
import TelephoneModification from './pages/my/setup/security/TelephoneModification/TelephoneModification';
import Mobilephonebinding from './pages/my/setup/security/TelephoneModification/Mobilephonebinding';
import loginPassword from './pages/my/setup/security/loginPassword/loginPassword';
import notification from './pages/my/setup/notification/notification'
import remind from './pages/my/setup//notification/remind'
import GeneralSettings from './pages/my/setup/Generalsettings/GeneralSettings';
import backgroundSettings from './pages/my/setup/Generalsettings/backgroundSettings';
import Storagespace from './pages/my/setup/Generalsettings/Storagespace'
import Backgroundvideo from './pages/my/setup/Generalsettings/Backgroundvideo'
import Videobackground from './pages/my/setup/Generalsettings/Videobackground/Videobackground'
// 登录模块
import Verificationcodelogin from './pages/Login/Verificationcodelogin';
import Accountlogin from './pages/Login/Accountlogin';
import register from './pages/Login/register';
import forgetPwd from './pages/Login/forgetPwd';
// import LoginIdentity from './pages/Login/LoginIdentity';
// import Login from './pages/Login/Login';
// import LoginSetPassword from './pages/Login/LoginSetPassword';
// import LoginForgetPassword from './pages/Login/LoginForgetPassword';
// import LoginSuccess from './pages/Login/LoginSuccess';
// import LoginRegister from './pages/Login/LoginRegister';
// import LoginRegisterDetail from './pages/Login/LoginRegisterDetail';

export default class Roots extends Component {
  render() {
    return (
      <View style={{ flex: 1 }}>
        <Root>
          <Router>
            <Stack hideNavBar>
              <Lightbox>
                <Tabs
                  key='tabs'
                  hideNavBar
                  tabBarStyle={{ backgroundColor: '#fff', borderTopWidth: 0 }}
                  showLabel={true}
                >
                  <Scene
                    key='maillist'
                    title={'雇佣军'}
                    component={maillist}
                    icon={({ focused }) => (
                      <Image style={{ width: 24, height: 24 }} source={focused ? Images.maillist_off : Images.maillist_on} />
                    )}
                    hideNavBar={true}
                    initial
                  />
                  <Scene
                    key='message'
                    title={'消息'}
                    component={message}
                    navBarButtonColor="transparent"
                    hideNavBar={true}
                    icon={({ focused }) => (
                      <Image style={{ width: 24, height: 24 }} source={focused ? Images.message_off : Images.message_on} />
                    )}
                  />
                  <Scene
                    key='socialcircle'
                    title={'摸鱼'}
                    component={socialcircle}
                    icon={({ focused }) => (
                      <Image style={{ width: 24, height: 24 }} source={focused ? Images.socialcircle_off : Images.socialcircle_on} />
                    )}
                    hideNavBar={true}
                  />
                  <Scene
                    key='my'
                    title={'我的'}
                    component={my}
                    icon={({ focused }) => (
                      <Image style={{ width: 24, height: 24 }} source={focused ? Images.my_off : Images.my_on} />
                    )}
                    hideNavBar={true}
                  />
                </Tabs>
              </Lightbox>
              <Scene
                key="StartPage"
                component={StartPage}
                initial
              />
              <Scene
                key="messagePage"
                component={messagePage}
              />
              <Scene
                key="filePage"
                component={filePage}
              />
              <Scene
                key="settings"
                component={settings}
              />
              <Scene
                key="findRecords"
                component={findRecords}
              />
              <Scene
                key="addfriends"
                component={addfriends}
              />
              <Scene
                key="notice"
                component={notice}
              />
              <Scene
                key="selectcontact"
                component={selectcontact}
              />
              <Scene
                key="scanAndAddFriends"
                component={scanAndAddFriends}
              />
              <Scene
                key="voice"
                component={voice}
              />
              <Scene
                key="video"
                component={video}
              />
              <Scene
                key="location"
                component={location}
              />
              <Scene
                key="Groupchatnickname"
                component={Groupchatnickname}
              />
              <Scene
                key="info"
                component={info}
              />
              <Scene
                key="SearchResult"
                component={SearchResult}
              />
              <Scene
                key="newfriends"
                component={newfriends}
              />
              <Scene
                key="introduces"
                component={introduces}
              />
              <Scene
                key="friendAvatar"
                component={friendAvatar}
              />
              <Scene
                key="corporatefriends"
                component={corporatefriends}
              />
              <Scene
                key="remarks"
                component={remarks}
              />
              <Scene
                key="complaint"
                component={complaint}
              />
              <Scene
                key="socialcircleDetails"
                component={socialcircleDetails}
              />
              <Scene
                key="socialCirclePromotion"
                component={socialCirclePromotion}
              />
              <Scene
                key="promotionProgress"
                component={promotionProgress}
              />
              <Scene
                key="recentAlbum"
                component={recentAlbum}
              />
              <Scene
                key="publish"
                component={publish}
              />
              <Scene
                key="addPosition"
                component={addPosition}
              />
              <Scene
                key="allowedPerson"
                component={allowedPerson}
              />
              <Scene
                key="notAllowedPerson"
                component={notAllowedPerson}
              />
              <Scene
                key="likeComment"
                component={likeComment}
              />
              <Scene
                key="uploadDetails"
                component={uploadDetails}
              />
              <Scene
                key="uploadAddDescribe"
                component={uploadAddDescribe}
              />
              <Scene
                key="personAccount"
                component={personAccount}
              />
              <Scene
                key="enterAccount"
                component={enterAccount}
              />
              <Scene
                key="authentications"
                component={authentications}
              />
              <Scene
                key="openMember"
                component={openMember}
              />
              <Scene
                key="promotionProgress"
                component={promotionProgress}
              />
              <Scene
                key="myAlbum"
                component={myAlbum}
              />
              <Scene
                key="upload"
                component={upload}
              />
              <Scene
                key="details"
                component={details}
              />
              <Scene
                key="personalData"
                component={personalData}
              />
              <Scene
                key="businLicense"
                component={businLicense}
              />
              <Scene
                key="personalPortrait"
                component={personalPortrait}
              />
              <Scene
                key="editNickname"
                component={editNickname}
              />
              <Scene
                key="editorialMotto"
                component={editorialMotto}
              />
              <Scene
                key="editingHobbies"
                component={editingHobbies}
              />
              <Scene
                key="editingProfession"
                component={editingProfession}
              />
              <Scene
                key="editSkillTag"
                component={editSkillTag}
              />
              <Scene
                key="editingShowPhone"
                component={editingShowPhone}
              />
              <Scene
                key="myCardBag"
                component={myCardBag}
              />
              <Scene
                key="certificateDetails"
                component={certificateDetails}
              />
              <Scene
                key="addCertificate"
                component={addCertificate}
              />
              <Scene
                key="addCertificates"
                component={addCertificates}
              />
              <Scene
                key="bankCardManag"
                component={bankCardManag}
              />
              <Scene
                key="addBankCards"
                component={addBankCards}
              />
              <Scene
                key="verifyNumberBank"
                component={verifyNumberBank}
              />
              <Scene
                key="addComplete"
                component={addComplete}
              />
              <Scene
                key="mySocialCircle"
                component={mySocialCircle}
              />
              <Scene
                key="functionMenuList"
                component={functionMenuList}
              />
              <Scene
                key="resume"
                component={resume}
              />
              <Scene
                key="editresume"
                component={editresume}
              />
              <Scene
                key="editworkpermit"
                component={editworkpermit}
              />
              <Scene
                key="qrcode"
                component={qrcode}
              />
              <Scene
                key="seenme"
                component={seenme}
              />
              <Scene
                key="setup"
                component={setup}
              />
              <Scene
                key="aboutJX"
                component={aboutJX}
              />
              <Scene
                key="userAgreement"
                component={userAgreement}
              />
              <Scene
                key="security"
                component={security}
              />
              <Scene
                key="privacy"
                component={privacy}
              />
              <Scene
                key="visibletime"
                component={visibletime}
              />
              <Scene
                key="authentication"
                component={authentication}
              />
              <Scene
                key="TelephoneModification"
                component={TelephoneModification}
              />
              <Scene
                key="Mobilephonebinding"
                component={Mobilephonebinding}
              />
              <Scene
                key="loginPassword"
                component={loginPassword}
              />
              <Scene
                key="notification"
                component={notification}
              />
              <Scene
                key="remind"
                component={remind}
              />
              <Scene
                key="GeneralSettings"
                component={GeneralSettings}
              />
              <Scene
                key="backgroundSettings"
                component={backgroundSettings}
              />
              <Scene
                key="Storagespace"
                component={Storagespace}
              />
              <Scene
                key="Backgroundvideo"
                component={Backgroundvideo}
              />
              <Scene
                key="Videobackground"
                component={Videobackground}
              />
              <Scene
                key="Verificationcodelogin"
                component={Verificationcodelogin}
              />
              <Scene
                key="Accountlogin"
                component={Accountlogin}
              />
              <Scene
                key="register"
                component={register}
              />
              <Scene
                key="forgetPwd"
                component={forgetPwd}
              />
            </Stack>
          </Router>
        </Root>
      </View>
    )
    // const MainStack = createBottomTabNavigator(
    //   {
    //     NewTab: {
    //       screen: message,
    //       navigationOptions: ({ navigation }) => ({
    //         tabBarLabel: '消息',
    //         tabBarIcon: ({ focused, tintColor }) => (
    //           <TabBarItem
    //             focused={focused}
    //             normalImage={Images.message_on}
    //             selectedImage={Images.message_off}
    //             width={24}
    //             height={24}
    //           />
    //         ),
    //       }),
    //     },

    //     MaillistTab: {
    //       screen: maillist,
    //       navigationOptions: ({ navigation }) => ({
    //         tabBarLabel: '通讯录',
    //         tabBarIcon: ({ focused, tintColor }) => (
    //           <TabBarItem
    //             focused={focused}
    //             normalImage={Images.maillist_on}
    //             selectedImage={Images.maillist_off}
    //             width={24}
    //             height={24}
    //           />
    //         ),
    //       }),
    //     },

    //     SearchTab: {
    //       screen: search,
    //       navigationOptions: ({ navigation }) => ({
    //         tabBarLabel: '搜索',
    //         tabBarIcon: ({ focused, tintColor }) => (
    //           <TabBarItem
    //             focused={focused}
    //             normalImage={Images.search_on}
    //             selectedImage={Images.search_off}
    //             width={24}
    //             height={24}
    //           />
    //         ),
    //       }),
    //     },
    //     SocialcircleTab: {
    //       screen: socialcircle,
    //       navigationOptions: ({ navigation }) => ({
    //         tabBarLabel: '社圈',
    //         tabBarIcon: ({ focused, tintColor }) => (
    //           <TabBarItem
    //             focused={focused}
    //             normalImage={Images.socialcircle_on}
    //             selectedImage={Images.socialcircle_off}
    //             width={24}
    //             height={24}
    //           />
    //         ),
    //       }),
    //     },
    //     MyTab: {
    //       screen: my,
    //       navigationOptions: ({ navigation }) => ({
    //         tabBarLabel: '我',
    //         tabBarIcon: ({ focused, tintColor }) => (
    //           <TabBarItem
    //             focused={focused}
    //             normalImage={Images.my_on}
    //             selectedImage={Images.my_off}
    //             width={24}
    //             height={24}
    //           />
    //         ),
    //       }),
    //     },
    //   },
    //   {
    //     tabBarComponent: TabBarBottom,
    //     tabBarPosition: 'bottom',
    //     swipeEnabled: false, // true表示左右滑动
    //     animationEnabled: false,
    //     lazy: true,
    //     tabBarOptions: {
    //       activeTintColor: AppCommonColor.blueColor,
    //       inactiveTintColor: '#B0BDC6',
    //       tabStyle: {
    //         // height: 40,
    //         margin: 5,
    //       },
    //       style: {
    //         height: 55,
    //         backgroundColor: '#f5f5f5',
    //         borderTopWidth: 0.5,
    //         borderTopColor: "rgb(200,200,200)"
    //       },
    //       indicatorStyle: {
    //         backgroundColor: 'white',
    //       },
    //     },
    //   },
    // );

    // const RootStack = createStackNavigator(
    //   {
    //     StartPage: { screen: StartPage },
    //     MainStack: { screen: MainStack },
    //     // 消息
    //     messagePage: { screen: messagePage },
    //     filePage: { screen: filePage },
    //     functionMenuList: { screen: functionMenuList },
    //     selectcontact: { screen: selectcontact },
    //     scanAndAddFriends: { screen: scanAndAddFriends },
    //     notice: { screen: notice },
    //     voice: { screen: voice },
    //     video: { screen: video },
    //     location: { screen: location },
    //     Groupchatnickname: { screen: Groupchatnickname },

    //     // 聊天设置
    //     settings: { screen: settings },
    //     // 查找聊天记录
    //     findRecords: { screen: findRecords },
    //     // 添加好友
    //     addfriends: { screen: addfriends },
    //     //搜索输入
    //     searchInput: { screen: searchInput },
    //     //搜索
    //     search: { screen: search },
    //     //筛选
    //     screens: { screen: screens },

    //     //  我
    //     personAccount: { screen: personAccount },
    //     enterAccount: { screen: enterAccount },
    //     authentications: { screen: authentications },
    //     openMember: { screen: openMember },
    //     myAlbum: { screen: myAlbum },
    //     upload: { screen: upload },
    //     details: { screen: details },
    //     personalData: { screen: personalData },
    //     businLicense: { screen: businLicense },
    //     personalPortrait: { screen: personalPortrait },
    //     editNickname: { screen: editNickname },
    //     editorialMotto: { screen: editorialMotto },
    //     editingHobbies: { screen: editingHobbies },
    //     editingProfession: { screen: editingProfession },
    //     editSkillTag: { screen: editSkillTag },
    //     editingShowPhone: { screen: editingShowPhone },
    //     myCardBag: { screen: myCardBag },
    //     certificateDetails: { screen: certificateDetails },
    //     addCertificate: { screen: addCertificate },
    //     addCertificates: { screen: addCertificates },
    //     bankCardManag: { screen: bankCardManag },
    //     addBankCards: { screen: addBankCards },
    //     verifyNumberBank: { screen: verifyNumberBank },
    //     addComplete: { screen: addComplete },
    //     mySocialCircle: { screen: mySocialCircle },
    //     resume: { screen: resume },
    //     editresume: { screen: editresume },
    //     editworkpermit: { screen: editworkpermit },
    //     qrcode: { screen: qrcode },
    //     seenme: { screen: seenme },
    //     setup: { screen: setup },
    //     aboutJX: { screen: aboutJX },
    //     userAgreement: { screen: userAgreement },
    //     security: { screen: security },
    //     privacy: { screen: privacy },
    //     visibletime: { screen: visibletime },
    //     authentication: { screen: authentication },
    //     TelephoneModification: { screen: TelephoneModification },
    //     Mobilephonebinding: { screen: Mobilephonebinding },
    //     loginPassword: { screen: loginPassword },
    //     notification: { screen: notification },
    //     remind: { screen: remind },
    //     GeneralSettings: { screen: GeneralSettings },
    //     backgroundSettings: { screen: backgroundSettings },
    //     Storagespace: { screen: Storagespace },
    //     Backgroundvideo: { screen: Backgroundvideo },
    //     Videobackground: { screen: Videobackground },

    //     // 通讯录
    //     newfriends: { screen: newfriends },
    //     introduces: { screen: introduces },
    //     remarks: { screen: remarks },
    //     complaint: { screen: complaint },
    //     friendAvatar: { screen: friendAvatar },
    //     corporatefriends: { screen: corporatefriends },
    //     //社圈
    //     socialcircle: { screen: socialcircle },
    //     socialcircleDetails: { screen: socialcircleDetails },
    //     socialCirclePromotion: { screen: socialCirclePromotion },
    //     promotionProgress: { screen: promotionProgress },
    //     recentAlbum: { screen: recentAlbum },
    //     publish: { screen: publish },
    //     addPosition: { screen: addPosition },
    //     allowedPerson: { screen: allowedPerson },
    //     notAllowedPerson: { screen: notAllowedPerson },
    //     likeComment: { screen: likeComment },
    //     uploadDetails: { screen: uploadDetails },
    //     uploadAddDescribe: { screen: uploadAddDescribe },
    //     //Logins
    //     Verificationcodelogin: { screen: Verificationcodelogin },
    //     forgetPwd: { screen: forgetPwd },
    //     Accountlogin: { screen: Accountlogin },
    //     register: { screen: register }
    //   },
    //   {
    //     defaultNavigationOptions: {
    //       gestureEnabled: false,
    //     },
    //     headerMode: 'none',
    //     mode: 'card',
    //   },
    // );
    // const AppContainer = createAppContainer(RootStack);
    // return <AppContainer />;
  }
}
